﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Demo02
    {
        //定义一个员工类，存放用户的工号、姓名和部门信息；定义两个构造函数，一个是无参；
        //一个有参构造函数，对类的属性进行初始化。
        private string id;
        private string name;
        private string section;

        public string Id 
        { 
            get {return this.id; } 
            set { this.id = value; } 
        }
        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }
        public string Section
        {
            get { return this.section; }
            set { this.section = value; }
        }

        public void Print()
        {
            Console.WriteLine("id:{0},名字:{1},部门:{2}", id, name, section);
        }

        public void Print1(string id,string name , string section) 
        {
            Console.WriteLine("id:{0},名字:{1},部门:{2}", id, name, section);
        }
    }
}
